package com.iot.web.controller.fineReport;


import com.iot.common.config.iotConfig;
import com.iot.common.constant.CacheConstants;
import com.iot.common.constant.Constants;
import com.iot.common.core.domain.AjaxResult;
import com.iot.common.utils.sign.Base64;
import com.iot.common.utils.uuid.IdUtils;
import com.iot.system.core.CoreDeviceStateLogsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.FastByteArrayOutputStream;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.concurrent.TimeUnit;

@RestController
public class DemonstrationLineController {

    @Autowired
    private CoreDeviceStateLogsService coreDeviceStateLogsService;

    @GetMapping("/deviceRunTime")
    public AjaxResult deviceRunTime(HttpServletResponse response) throws IOException
    {
        AjaxResult ajax = AjaxResult.success();
        Integer deviceRunTime = coreDeviceStateLogsService.getDeviceRunTime();
        return ajax.put("deviceRunTime", deviceRunTime);
    }



}
